From c174bece23eef76efc5458cfec440ab6a6279a24 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Tue, 1 Nov 2005 15:57:19 +0100 Subject: [PATCH] Catch KeyboardInterrupt, to avoid spewing error messages on Ctrl-C. Signed-off-by: Ewan Mellor --- tools/python/xen/xm/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 1e6c87644a..ebb7e644e5 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -791,6 +791,9 @@ def main(argv=sys.argv): else: err("Error connecting to xend: %s. Is xend running?" % ex[1]) sys.exit(1) + except KeyboardInterrupt: + print "Interrupted." + sys.exit(1) except IOError: if os.geteuid() != 0: err("Most commands need root access. Please try again as root.") -- 2.30.2